import request from '@/utils/request'

// 销售属性
export function getAttributeList(data) {
  return request({
    url: '/base/classification-attribute-template/get-list',
    method: 'post',
    data
  })
}
// 样品单列表
export function getSampleList(data) {
  return request({
    url: '/sample/list',
    method: 'post',
    data
  })
}
// 渠道sku
export function getChannelSkuList(data) {
  return request({
    url: '/product/product-channel-sku/list',
    method: 'post',
    data
  })
}


// // 供应商列表
// export function getSupplierOptions(data) {
//   return request({
//     baseURL: window.APP_GETEWAY.pms,
//     url: '/v1/base/supplier',
//     method: 'post',
//     data
//   }).then(res => res.data.map(d => ({ label: d.supplier_name, value: d.s_id })))
// }
// sku列表
export function getSkuList(data) {
  return request({
    url: '/v1/goods/sku/list',
    method: 'post',
    data
  })
}

// 获取模板属性
export function getClassificationAttribute(data) {
  return request({
    url: '/base/classification-attribute-template/get-template-option',
    method: 'post',
    data
  })
}

//获取辅料
export function getSKUAccessories(data) {
  return request({
    url: '/v1/goods/sku-accessories/list',
    method: 'post',
    data
  })
}



// 创建供应商并变更单
export function changeOrderSupplier(data) {
  return request({
    url: '/v1/goods/change-order/create-supplier',
    method: 'POST',
    data
  })
}


// 获取分类-按传入id顺序
export function getCategory(data) {
  return request({
    url: '/v1/base/base-back-columns/get-category',
    method: 'post',
    data
  })
}

